﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using VCN.App.DataAccessLayer;
using VCN.App.DataTransferObjects;

namespace VCN.home.UC
{
    public partial class ContactUC : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void submit_contact_button(object sender, EventArgs e)
        {
            ContactUsObject m_contact_obj = new ContactUsObject();
            m_contact_obj.Name = txtName.Text;
            m_contact_obj.Email = txtEmail.Text;
            m_contact_obj.Subject = txtSubject.Text;
            m_contact_obj.Message = txtMessage.Text;
            m_contact_obj.Datetime = DateTime.Now;
            ContactUsDAO.insert(m_contact_obj);
        }
    }
}